/** * Tests the implicit cast to string, that should be the hash. * * @covers ::__construct * @covers ::__toString * @covers ::toString * @covers ::getEmail * @covers ::setEmail * * @depends testToString * @dataProvider validHashesProvider * * @return */ public function testImplicitCastToString($email, $hash) { $obj = new Hash($email); $actual = $obj->__toString(); $this->assertEquals($hash, $actual); $actual = (string) $obj; $this->assertEquals($hash, $actual); $actual = $obj . ''; $this->assertEquals($hash, $actual); }