public function testAddResourceToResearch() { $research = new Research(); $this->assertEquals(0, count($research->resources)); $aResource = $research->addNewResource("This is my first resource", "http://eviltester.com"); $this->assertEquals(1, $aResource->id); $this->assertEquals("This is my first resource", $aResource->title); $this->assertEquals("http://eviltester.com", $aResource->url); $this->assertEquals(1, count($research->resources)); $aSecondResource = $research->addNewResource("This is my second resource", "http://seleniumsimplified.com"); $this->assertEquals(2, $aSecondResource->id); $this->assertEquals("This is my second resource", $aSecondResource->title); $this->assertEquals("http://seleniumsimplified.com", $aSecondResource->url); $this->assertEquals("", $aSecondResource->description); $this->assertEquals(2, count($research->resources)); }