/**
  * Call methods in finisher class
  *
  * @param AbstractFinisher $finisher
  * @return void
  */
 protected function callFinisherMethods(AbstractFinisher $finisher)
 {
     foreach (get_class_methods($finisher) as $method) {
         if (!StringUtility::endsWith($method, 'Finisher') || strpos($method, 'initialize') === 0) {
             continue;
         }
         $this->callInitializeFinisherMethod($finisher, $method);
         $finisher->{$method}();
     }
 }
Example #2
0
 /**
  * endsWith Test
  *
  * @param string $haystack
  * @param string $needle
  * @param bool $expectedResult
  * @dataProvider endsWithReturnsStringDataProvider
  * @return void
  * @test
  */
 public function endsWithReturnsString($haystack, $needle, $expectedResult)
 {
     $this->assertSame($expectedResult, StringUtility::endsWith($haystack, $needle));
 }
 /**
  * Should this key skipped because it starts with _ or ends with .
  *
  * @param string $key
  * @return bool
  */
 protected function isSkippedKey($key)
 {
     return StringUtility::startsWith($key, '_') || StringUtility::endsWith($key, '.');
 }