Example #1
0
 /**
  * @covers ::pluckProperty
  */
 public function testPluckProperty()
 {
     $models = new Models([new Model(['id' => 10, 'name' => 'test1']), new Model(['id' => 20, 'name' => 'test2'])]);
     $expected = [10, 20];
     $this->assertSame($expected, $models->pluckProperty('id'));
     $expected = ['test1', 'test2'];
     $this->assertSame($expected, $models->pluckProperty('name'));
 }