Exemplo n.º 1
0
 /**
  * @dataProvider toYamlDataProvider
  */
 public function testFromYAML($expected)
 {
     $book = new Book();
     $book->fromYAML($expected);
     // FIXME: fromArray() doesn't take related objects into account
     $book->resetModified();
     $author = $this->book->getAuthor();
     $this->book->setAuthor(null);
     $this->book->setAuthorId($author->getId());
     $publisher = $this->book->getPublisher();
     $this->book->setPublisher(null);
     $this->book->setPublisherId($publisher->getId());
     $this->book->resetModified();
     $this->assertEquals($this->book, $book);
 }