public function testCRUD() { $dto = new OwnerDTO(); $dto->setEmail(self::EMAIL); $dto->setPassword(self::PASSWORD); $json = json_encode($dto); $this->curl->doPost($json); $data = $this->curl->getResultData(); $this->assertEquals(self::ID, $data->id); $this->assertEquals(self::EMAIL, $data->email); $this->assertNull($data->password); $this->curl->doGetId(self::ID); $data = $this->curl->getResultData(); $this->assertEquals(self::ID, $data->id); $this->assertEquals(self::EMAIL, $data->email); $this->assertNull($data->password); $dto->setId(self::ID); $dto->setEmail(self::EMAIL_ANOTHER); $json = json_encode($dto); $this->curl->doPut(self::ID, $json); $data = $this->curl->getResultData(); $this->assertEquals(self::ID, $data->id); $this->assertEquals(self::EMAIL_ANOTHER, $data->email); $this->assertNull($data->password); $this->curl->doDelete(self::ID); $this->curl->doGetId(self::ID); $data = $this->curl->getResultData(); $this->assertNull($data->id); $this->assertNull($data->email); $this->assertNull($data->password); }