コード例 #1
0
 /**
  * Test getter/setter for channel property
  */
 public function testGetSetChannel()
 {
     $this->assertNull($this->completeness->getChannel());
     $expectedChannel = $this->createChannel('channel');
     $this->assertEntity($this->completeness->setChannel($expectedChannel));
     $this->assertEquals($expectedChannel, $this->completeness->getChannel());
 }
コード例 #2
0
 function it_normalizes_completeness(Completeness $completeness, ChannelInterface $channel, LocaleInterface $locale)
 {
     $channel->getCode()->willReturn('ecommerce');
     $locale->getCode()->willReturn('en_US');
     $completeness->getChannel()->willReturn($channel);
     $completeness->getLocale()->willReturn($locale);
     $completeness->getRatio()->willReturn(42);
     $this->normalize($completeness, 'mongodb_json', [])->shouldReturn(["ecommerce-en_US" => 42]);
 }
 /**
  * {@inheritDoc}
  */
 public function getChannel()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getChannel', array());
     return parent::getChannel();
 }