public function testProbeEquivalence() { $n = new Notification(); $term1 = new Terminal($this->getMock('de\\weltraumschaf\\ebnf\\ast\\Node')); $term1->value = "a"; $term2 = new Terminal($this->getMock('de\\weltraumschaf\\ebnf\\ast\\Node')); $term2->value = "b"; $term1->probeEquivalence(new Identifier($this->getMock('de\\weltraumschaf\\ebnf\\ast\\Node')), $n); $this->assertFalse($n->isOk()); $this->assertEquals("Probed node types mismatch: 'de\\weltraumschafbnf\\ast\\Terminal' != 'de\\weltraumschafbnf\\ast\\Identifier'!", $n->report()); $n = new Notification(); $term1->probeEquivalence($term2, $n); $this->assertFalse($n->isOk()); $this->assertEquals("Terminal value mismatch: 'a' != 'b'!", $n->report()); $n = new Notification(); $term2->probeEquivalence($term1, $n); $this->assertFalse($n->isOk()); $this->assertEquals("Terminal value mismatch: 'b' != 'a'!", $n->report()); }