Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 /**
  * @return array
  */
 public function listMigrated()
 {
     return ArrayUtils::only($this->listMigrations(), $this->listMigratedVersion());
 }
Ejemplo n.º 3
0
 /**
  * @param string|array $columns
  * @return array
  */
 public function only($columns)
 {
     return ArrayUtils::only($this->toArray(), $columns);
 }