public function test_find_related_should_find_composite_exceptions() { $foo = new AttributeException(); $bar = new AttributeException(); $baz = new AttributeException(); $bat = new AttributeException(); $foo->configure('foo'); $bar->configure('bar'); $baz->configure('baz'); $bat->configure('bat'); $foo->addRelated($bar); $bar->addRelated($baz); $baz->addRelated($bat); $this->assertSame($bar, $foo->findRelated('bar')); $this->assertSame($baz, $foo->findRelated('baz')); $this->assertSame($baz, $foo->findRelated('bar.baz')); $this->assertSame($baz, $foo->findRelated('baz')); $this->assertSame($bat, $foo->findRelated('bar.bat')); $this->assertSame(false, $foo->findRelated('none')); $this->assertSame(false, $foo->findRelated('bar.none')); }