assertNotNull($obj); $this->assertNotNull($obj->getName()); $this->assertNotNull($obj->getUrl()); $this->assertEquals(self::getJson(), $obj->toJson()); return $obj; } /** * @depends testSerializationDeserialization * @param FileAttachment $obj */ public function testGetters($obj) { $this->assertEquals($obj->getName(), "TestSample"); $this->assertEquals($obj->getUrl(), "http://www.google.com"); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Url is not a fully qualified URL */ public function testUrlValidationForUrl() { $obj = new FileAttachment(); $obj->setUrl(null); } }