public function testFromObject() { $mock = $this->getMock(AuthorInterface::class); $author = Author::fromObject($mock); $this->assertNull($author->identifier); $this->assertEquals(get_class($mock), $author->type); }