Beispiel #1
0
 /**
  * Tests resource path placeholders
  *
  * @dataProvider providerParseResourcePathVariables
  *
  * @param modResource $resource
  * @param $path
  * @param $expected
  */
 public function testParseResourcePathVariables(modResource $resource, $path, $expected)
 {
     global $modx;
     $alpacka = new Alpacka($modx);
     // Set the resource
     $alpacka->setResource($resource);
     // Test the path
     $this->assertEquals($expected, $alpacka->parsePathVariables($path));
 }
Beispiel #2
0
 /**
  * @dataProvider providerGetBooleanOption
  *
  * @param $value
  * @param $expected
  */
 public function testGetBooleanOption($expected, $value)
 {
     $this->assertEquals($expected, $this->service->castValueToBool($value));
 }
Beispiel #3
0
 public function __construct($instance, array $config = array())
 {
     parent::__construct($instance, $config);
     $this->setVersion(1, 2, 3, 'pl');
 }