tests/unit/RowTraitTest.php
/**
     * Test the set/getValue() method converting the value by invoking a callback.
     *
     * @return void
     */
Test the set/getValue() method converting the value by invoking a callback.
@return void
Test the set / getValue () method converting the value by invoking a callback . @return void
public function testGetValueWithStringConvertedToNumberByCallback()
     {
         $this->rowTrait->setHeaders(array($name = 'test' => 0));
         $this->rowTrait->setValue($name, '100');
         $this->assertSame(100, $this->rowTrait->getValue($name, null, function ($value) {
            return (integer) $value;
         }));
     }
public function testGetValueWithStringConvertedToNumberByCallback ( ) { $ this -> rowTrait -> setHeaders ( array ( $ name = 'test' => 0 ) ) ; $ this -> rowTrait -> setValue ( $ name , '100' ) ; $ this -> assertSame ( 100 , $ this -> rowTrait -> getValue ( $ name , null , function ( $ value ) { return ( integer ) $ value ; } ) ) ; }
Test the set/getValue() method converting the value by invoking a callback.
Test the set / getValue () method converting the value by invoking a callback .
// mock the available haeders // query whether or not the given value is available and a number