X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fnikic%2Fphp-parser%2Ftest%2FPhpParser%2FUnserializer%2FXMLTest.php;fp=vendor%2Fnikic%2Fphp-parser%2Ftest%2FPhpParser%2FUnserializer%2FXMLTest.php;h=0000000000000000000000000000000000000000;hp=3bc86dbed1cff4cf27ddcb3b3d169feeefefaac1;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0
diff --git a/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php b/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php
deleted file mode 100644
index 3bc86dbed..000000000
--- a/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
- 1
-
-
-
- // comment
-
- /** doc comment */
-
-
-
- Test
-
-
-
-XML;
-
- $unserializer = new XML;
- $this->assertEquals(
- new Scalar\String_('Test', array(
- 'startLine' => 1,
- 'comments' => array(
- new Comment('// comment' . "\n", 2),
- new Comment\Doc('/** doc comment */', 3),
- ),
- )),
- $unserializer->unserialize($xml)
- );
- }
-
- public function testEmptyNode() {
- $xml = <<
-
-
-
-XML;
-
- $unserializer = new XML;
-
- $this->assertEquals(
- new Scalar\MagicConst\Class_,
- $unserializer->unserialize($xml)
- );
- }
-
- public function testScalars() {
- $xml = <<
-
-
-
-
- test
-
-
- 1
- 1
- 1.5
-
-
-
-
-
-XML;
- $result = array(
- array(), array(),
- 'test', '', '',
- 1,
- 1, 1.5,
- true, false, null
- );
-
- $unserializer = new XML;
- $this->assertEquals($result, $unserializer->unserialize($xml));
- }
-
- /**
- * @expectedException \DomainException
- * @expectedExceptionMessage AST root element not found
- */
- public function testWrongRootElementError() {
- $xml = <<
-
-XML;
-
- $unserializer = new XML;
- $unserializer->unserialize($xml);
- }
-
- /**
- * @dataProvider provideTestErrors
- */
- public function testErrors($xml, $errorMsg) {
- $this->setExpectedException('DomainException', $errorMsg);
-
- $xml = <<
-
- $xml
-
-XML;
-
- $unserializer = new XML;
- $unserializer->unserialize($xml);
- }
-
- public function provideTestErrors() {
- return array(
- array('test', '"true" scalar must be empty'),
- array('test', '"false" scalar must be empty'),
- array('test', '"null" scalar must be empty'),
- array('bar', 'Unknown scalar type "foo"'),
- array('x', '"x" is not a valid int'),
- array('x', '"x" is not a valid float'),
- array('', 'Expected node or scalar'),
- array('test', 'Unexpected node of type "foo:bar"'),
- array(
- 'test',
- 'Expected sub node or attribute, got node of type "foo:bar"'
- ),
- array(
- '',
- 'Expected node or scalar'
- ),
- array(
- '',
- 'Unknown node type "Foo"'
- ),
- );
- }
-}