/** * Tests the JFeed::offsetGet method. * * @return void * * @since 12.3 */ public function testOffsetGet() { $offset = new stdClass(); $mock = $this->getMockBuilder('SplObjectStorage')->disableOriginalConstructor()->getMock(); $mock->expects($this->once())->method('offsetGet')->will($this->returnValue(true)); TestReflection::setValue($this->_instance, 'entries', $mock); $this->assertTrue($this->_instance->offsetGet($offset)); }
/** * Tests the JFeed::offsetGet method. * * @return void * * @since 12.3 */ public function testOffsetGet() { if (PHP_VERSION == '5.4.29' || PHP_VERSION == '5.5.13' || PHP_MINOR_VERSION == '6') { $this->markTestSkipped('Test is skipped due to a PHP bug in versions 5.4.29 and 5.5.13 and a change in behavior in the 5.6 branch'); } $offset = new stdClass(); $mock = $this->getMockBuilder('SplObjectStorage')->disableOriginalConstructor()->getMock(); $mock->expects($this->once())->method('offsetGet')->will($this->returnValue(true)); TestReflection::setValue($this->_instance, 'entries', $mock); $this->assertTrue($this->_instance->offsetGet($offset)); }