function testSelectListKeyValueWhenNothingReturned() { $manager = $this->deps->manager; $result = AF::keyValue($manager->selectList('Pants', ['foo', 'bar'], ['where' => '1=0']), 'foo', 'bar'); $expected = []; $this->assertSame($expected, $result); }
/** * @group functions * @covers Amiss\Functions::keyValue */ public function testKeyValueFromObjectsWithKeyValueProperties() { $input = array((object) array('a' => '1', 'c' => '2'), (object) array('a' => '3', 'c' => '4')); $result = Functions::keyValue($input, 'a', 'c'); $expected = array('1' => '2', '3' => '4'); $this->assertEquals($expected, $result); }