Exemplo n.º 1
0
 public function testSameValueAs()
 {
     $foo1 = new StringLiteral('foo');
     $foo2 = new StringLiteral('foo');
     $bar = new StringLiteral('bar');
     $this->assertTrue($foo1->sameValueAs($foo2));
     $this->assertTrue($foo2->sameValueAs($foo1));
     $this->assertFalse($foo1->sameValueAs($bar));
     $mock = $this->getMock('ValueObjects\\ValueObjectInterface');
     $this->assertFalse($foo1->sameValueAs($mock));
 }
Exemplo n.º 2
0
 public function testGetName()
 {
     $name = new StringLiteral('Europe/Madrid');
     $timeZone = new TimeZone($name);
     $this->assertTrue($name->sameValueAs($timeZone->getName()));
 }