Class Describe_Template
- UnitTestCase
- SimpleSpec
- Describe_Template
License:
for all
Author: - Taylor Luk aka 'speedmax'
Example: class Describe_his_mum extends SimpleSpec { function prepare() { $this->mum = new Mum(array('mood'=>'angry')); } function should_be_very_angry_when_i_break_my_lunch_box() { expects($this->mum->mood)->should_be('angry'); } function should_be_very_happy_when_i_punch_her_in_the_face() { punch($this->mum); expects($this->mum->mood)->should_be('happy'); } function cleanup() { unset($this->mum); // kill da mum } }
Located at vendors/h2o/spec/h2o_spec.php
Author: - Taylor Luk aka 'speedmax'
Example: class Describe_his_mum extends SimpleSpec { function prepare() { $this->mum = new Mum(array('mood'=>'angry')); } function should_be_very_angry_when_i_break_my_lunch_box() { expects($this->mum->mood)->should_be('angry'); } function should_be_very_happy_when_i_punch_her_in_the_face() { punch($this->mum); expects($this->mum->mood)->should_be('happy'); } function cleanup() { unset($this->mum); // kill da mum } }
Located at vendors/h2o/spec/h2o_spec.php
Methods summary
public
|
Methods inherited from SimpleSpec
__call()
,
__construct()
,
_isTest()
,
assert()
,
cleanup()
,
expect()
,
getAssertionLine()
,
offsetExists()
,
offsetGet()
,
offsetSet()
,
offsetUnset()
,
prepare()
,
setUp()
,
tearDown()
,
value_of()