markTestSkipped(); } $this->setPass(new StrictTypesPass()); } public function testProcess() { $this->assertProcessesAs('declare(strict_types=1)', 'declare (strict_types=1);'); $this->assertProcessesAs('null', "declare (strict_types=1);\nnull;"); $this->assertProcessesAs('declare(strict_types=0)', 'declare (strict_types=0);'); $this->assertProcessesAs('null', 'null;'); } /** * @dataProvider invalidDeclarations * @expectedException \Psy\Exception\FatalErrorException */ public function testInvalidDeclarations($declaration) { $stmts = $this->parse($declaration); $this->traverser->traverse($stmts); } public function invalidDeclarations() { return array( array('declare(strict_types=-1)'), array('declare(strict_types=2)'), array('declare(strict_types="foo")'), ); } }