Ejemplo n.º 1
0
 /**
  * @covers ::__construct
  * @group  Container
  */
 public function testConstruct()
 {
     $container = new Collection($this->type, ['asd'], true);
     $this->assertSame($this->type, $container->getType());
     $this->assertEquals(['asd'], $container->getContents());
     $this->assertTrue($container->isReadOnly());
 }
Ejemplo n.º 2
0
 /**
  * Creates a new Money Cart
  *
  * @param Currency $currency
  * @param mixed    $id
  */
 public function __construct(Currency $currency, $id = null)
 {
     $this->id = $id;
     $this->currency = $currency;
     Collection::__construct(new Type('Indigo\\Cart\\Money\\Item'));
 }