tests/unit/Observers/AbstractObserverTest.php
/**
     * Test the initializeEntity() method.
     */
Test the initializeEntity() method.
Test the initializeEntity () method .
public function testInitializeEntity()
    {
        $entity = array('attribute' => 100);
        $expectedResult = array_merge($entity, array(EntityStatus::MEMBER_NAME => EntityStatus::STATUS_CREATE));
        $this->assertSame($expectedResult, $this->abstractObserver->initializeEntity($entity));
    }
public function testInitializeEntity ( ) { $ entity = array ( 'attribute' => 100 ) ; $ expectedResult = array_merge ( $ entity , array ( EntityStatus :: MEMBER_NAME => EntityStatus :: STATUS_CREATE ) ) ; $ this -> assertSame ( $ expectedResult , $ this -> abstractObserver -> initializeEntity ( $ entity ) ) ; }
Test the initializeEntity() method.
Test the initializeEntity () method .
// initialize the entity // prepare the expected result // assert that the entity has been initialized