Pheasant\Tests\EventsTestCase::testBuiltInEventMethods PHP Method

testBuiltInEventMethods() public method

    public function testBuiltInEventMethods()
    {
        $this->mapper->shouldReceive('save')->times(1);
        $this->initialize('Pheasant\\Tests\\Examples\\EventTestObject', function ($builder) {
            $builder->properties(array('test' => new Types\StringType()));
        });
        $do = EventTestObject::create(array('test' => 'llamas'));
        $this->assertEquals(array('beforeSave', 'afterSave'), $do->events);
    }