public function getKeys() { $keys = []; foreach ($this->getRules() as $keyRule) { $keys[] = $keyRule->reference; } return $keys; }
public function testShouldReturnKeys() { $key1 = new Key('foo', new AlwaysValid(), true); $key2 = new Key('bar', new AlwaysValid(), false); $keySet = new KeySet($key1, $key2); $this->assertEquals(['foo', 'bar'], $keySet->getKeys()); }