public function testGettersSetters() { $rotator1 = \Mockery::mock('Giftcards\\Encryption\\CipherText\\Rotator\\RotatorInterface'); $rotator1Name = $this->getFaker()->unique()->word; $rotator2 = \Mockery::mock('Giftcards\\Encryption\\CipherText\\Rotator\\RotatorInterface'); $rotator2Name = $this->getFaker()->unique()->word; $rotator3 = \Mockery::mock('Giftcards\\Encryption\\CipherText\\Rotator\\RotatorInterface'); $rotator3Name = $this->getFaker()->unique()->word; $this->registry->set($rotator1Name, $rotator1)->set($rotator2Name, $rotator2)->set($rotator3Name, $rotator3); $this->assertTrue($this->registry->has($rotator1Name)); $this->assertSame($rotator1, $this->registry->get($rotator1Name)); $this->assertTrue($this->registry->has($rotator2Name)); $this->assertSame($rotator2, $this->registry->get($rotator2Name)); $this->assertTrue($this->registry->has($rotator3Name)); $this->assertSame($rotator3, $this->registry->get($rotator3Name)); $this->assertSame(array($rotator1Name => $rotator1, $rotator2Name => $rotator2, $rotator3Name => $rotator3), $this->registry->all()); }
public function get($name) { $this->load($name); return parent::get($name); }