/** * Test __toString */ public function testToString() { $project = new Phprojekt_Project(array('db' => $this->sharedFixture)); $dbField = new Phprojekt_DatabaseManager_Field($project->getInformation(), 'parent', 'testvalue'); ob_start(); echo $dbField; $stringValue = ob_get_contents(); ob_end_clean(); $this->assertEquals('testvalue', $stringValue); }
/** * Test what happens if calling find() with 2 arguments */ public function testFindWithTwoArgument() { $project = new Phprojekt_Project(array('db' => $this->sharedFixture)); $this->setExpectedException('Phprojekt_ActiveRecord_Exception'); // Should throw an exception instead. $project->find(1, 2); }
/** * Test __toString */ public function testToString() { $project = new Phprojekt_Project(array('db' => $this->sharedFixture)); $dbField = new Phprojekt_DatabaseManager_Field($project->getInformation(), 'parent', 'testvalue'); $this->assertEquals('testvalue', $dbField->value); }