Today’s Objective(s)
List the assertions that can be done using the result of expect- Try to use the entire $I->wantTo(‘load all values’); style of Codeception
- Research executing tests and viewing results from a browser
- Research best practices for Unit testing in Yii
- Research best pracices for acceptance/functional testing in Yii
Introduction
For Sunday’s update it will be short and sweet, will list out the different assertions that can be done using the result of the expect function, which isn’t a huge list
- equals
- notEquals
- contains
- notContains
- greaterThan
- lessThen
- greaterOrEquals
- lessOrEquals
- true
- false
- null
- notNull
- isEmpty
- notEmpty
- hasKey
- hasntKey
As I had initially theorized, this are all calls to a different assert from the PHPUnit framework of generally the same name:
public function equals($expected) { a::assertEquals($expected, $this->actual, $this->description); }
Conclusion
With that tangent finally wrapped up. Can get back to more of the finer parts of unit testing using Codeception, I’m looking forward to it!
Upcoming Objective(s)
- Try to use the entire $I->wantTo(‘load all values’); style of Codeception
- Research executing tests and viewing results from a browser
- Research best practices for Unit testing in Yii
- Research best pracices for acceptance/functional testing in Yii