/** * Test an empty User entity */ public function testEmptyUser() { $user = new User(); $this->assertEquals('New User', $user->__toString()); $this->assertNull($user->getId()); $this->assertNull($user->getFullName()); $this->assertNull($user->getFacebookAccessToken()); $this->assertNull($user->getFacebookId()); $this->assertEquals(0, $user->getItems()->count()); }
/** * {@inheritDoc} */ public function __toString() { $this->__initializer__ && $this->__initializer__->__invoke($this, '__toString', []); return parent::__toString(); }
/** * @return string */ public function __toString() { return sprintf('%s - %s', $this->author ? $this->author->__toString() : null, $this->content); }