public function testMethodOnlyWithDefaultValue() { $values = ['foo' => 1, 'bar' => 2, 'baz' => 3, 'qux' => 4]; $keys = 'bar qux wot'; $expected = ['bar' => 2, 'qux' => 4, 'wot' => null]; $this->assertSame($expected, ArrayUtils::only($values, $keys, null)); }
/** * @return array */ public function listMigrated() { return ArrayUtils::only($this->listMigrations(), $this->listMigratedVersion()); }
/** * @param string|array $columns * @return array */ public function only($columns) { return ArrayUtils::only($this->toArray(), $columns); }