/**
  * Function to return a boolean value indicating whether
  * the provided status is matched by the configured setting.
  *
  * Currently supports:
  *
  * @param $option
  * @param $status
  *
  * @return bool
  */
 protected function matchesStatus($option, $status)
 {
     $configValue = Config::get($option);
     if (is_array($configValue)) {
         return Config::contains($option, $status);
     }
     return Str::is($configValue, $status);
 }
Example #2
0
 public function testIs()
 {
     $this->assertTrue(Str::is('/', '/'));
     $this->assertFalse(Str::is('/', ' /'));
     $this->assertFalse(Str::is('/', '/a'));
     $this->assertTrue(Str::is('foo/*', 'foo/bar/baz'));
     $this->assertTrue(Str::is('*/foo', 'blah/baz/foo'));
 }