@@ -251,6 +251,7 @@ public function testYaml()
251
251
try {
252
252
$ tDoc = array ();
253
253
$ tDoc ['document ' ] = $ this ->checkForTimestamp ($ testFile , $ document );
254
+ $ tDoc ['document ' ] = $ this ->checkForList ($ tDoc ['document ' ]);
254
255
$ tDoc ['document ' ] = $ this ->checkForEmptyProperty ($ testFile , $ tDoc ['document ' ]);
255
256
$ tDoc ['values ' ] = $ this ->yaml ->parse ($ tDoc ['document ' ], false , false , true );
256
257
@@ -320,6 +321,7 @@ public function testFutureModeYaml()
320
321
try {
321
322
$ tDoc = array ();
322
323
$ tDoc ['document ' ] = $ this ->checkForTimestamp ($ testFile , $ document );
324
+ $ tDoc ['document ' ] = $ this ->checkForList ($ tDoc ['document ' ]);
323
325
$ tDoc ['document ' ] = $ this ->checkForEmptyProperty ($ testFile , $ tDoc ['document ' ]);
324
326
$ tDoc ['values ' ] = $ this ->yaml ->parse ($ tDoc ['document ' ], false , false , true );
325
327
@@ -716,6 +718,17 @@ private function checkForTimestamp($file, $document)
716
718
return $ document ;
717
719
}
718
720
721
+ /**
722
+ * Hack to rewrite the command `task.list` into `task.get`, since list is a reserved
723
+ * word in PHP. :/
724
+ *
725
+ * @param $file
726
+ * @return mixed
727
+ */
728
+ private function checkForList ($ document ) {
729
+ return str_replace ("tasks.list " , "tasks.get " , $ document );
730
+ }
731
+
719
732
private function checkForEmptyProperty ($ file , $ document )
720
733
{
721
734
$ pattern = "/{.*?('').*?:.*?{/ " ;
0 commit comments