/** * Testing that objects are being added to the dirtyObject array correctly * and that this array is in the session being shared by controllers. * * @since 1.0 */ public function testMarkDirtySession() { $this->person->set('email', '*****@*****.**'); $this->controller->markDirty($this->person); // calling the constructor of the other controller will check the session $controller2 = new ImageController(); $dirty = $controller2->getDirtyObjects(); $this->assertEquals('*****@*****.**', $dirty[0]->get('email'), 'Testing that objects are being added to the dirtyObject array correctly and that this array is in the session being shared by controllers'); }
/** * Testing that objects are being added to the dirtyObjects array correctly. * * @since 1.0 */ public function testMarkDirtyAdd() { $this->controller->markDirty($this->person); $dirtyObjects = $this->controller->getDirtyObjects(); $this->assertEquals('http://unitTestUser/', $dirtyObjects[0]->get('URL'), 'Testing that objects are being added to the dirtyObject array correctly'); }