Exemple #1
0
 public function testSameValueAs()
 {
     $real1 = new Real(5.64);
     $real2 = new Real(5.64);
     $real3 = new Real(6.01);
     $this->assertTrue($real1->sameValueAs($real2));
     $this->assertTrue($real2->sameValueAs($real1));
     $this->assertFalse($real1->sameValueAs($real3));
     $mock = $this->getMock('EmbarkNow\\ValueObjects\\ValueObjectInterface');
     $this->assertFalse($real1->sameValueAs($mock));
 }
 public function testGetArgument()
 {
     $arg = new Real(1.0010398733119);
     $this->assertTrue($arg->sameValueAs($this->complex->getArgument()));
 }