pop() public method

Note: This differs from the JavaScript behavior of Array.pop which will return the popped element. An empty array will result in an empty array again.
public pop ( array $array ) : array
$array array
return array The array without the last element
 /**
  * @test
  * @dataProvider popExamples
  */
 public function popWorks($array, $expected)
 {
     $helper = new ArrayHelper();
     $poppedArray = $helper->pop($array);
     $this->assertEquals($expected, $poppedArray);
 }