Lines Matching +full:php +full:- +full:version
1 <?php
14 $this->cli = new CliMock();
15 $this->cli->stderr = fopen('php://memory','r+');
16 $this->cli->stdout = fopen('php://memory','r+');
22 $this->assertEquals(
24 $this->cli->main(array('vobject', '--hi'))
26 rewind($this->cli->stderr);
27 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
33 $this->assertEquals(
35 $this->cli->main(array('vobject', '-q'))
37 $this->assertTrue($this->cli->quiet);
39 rewind($this->cli->stderr);
40 $this->assertEquals(0, strlen(stream_get_contents($this->cli->stderr)));
46 $this->assertEquals(
48 $this->cli->main(array('vobject', '-h'))
50 rewind($this->cli->stderr);
51 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
57 $this->assertEquals(
59 $this->cli->main(array('vobject', '--format=jcard'))
62 rewind($this->cli->stderr);
63 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
65 $this->assertEquals('jcard', $this->cli->format);
71 $this->assertEquals(
73 $this->cli->main(array('vobject', '--format=foo'))
76 rewind($this->cli->stderr);
77 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
79 $this->assertNull($this->cli->format);
85 $this->assertEquals(
87 $this->cli->main(array('vobject', '--inputformat=foo'))
90 rewind($this->cli->stderr);
91 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
93 $this->assertNull($this->cli->format);
100 $this->assertEquals(
102 $this->cli->main(array('vobject', 'color'))
105 rewind($this->cli->stderr);
106 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
112 $this->assertEquals(
114 $this->cli->main(array('vobject', 'color', 'a', 'b', 'c'))
121 $this->assertEquals(
123 $this->cli->main(array('vobject', 'foo', '-'))
130 $inputStream = fopen('php://memory','r+');
134 VERSION:3.0
140 $this->cli->stdin = $inputStream;
142 $this->assertEquals(
144 $this->cli->main(array('vobject', 'convert','--format=json', '-'))
147 rewind($this->cli->stdout);
148 $version = Version::VERSION;
149 $this->assertEquals(
150 …'["vcard",[["version",{},"text","4.0"],["prodid",{},"text","-\/\/Sabre\/\/Sabre VObject '. $versio…
151 stream_get_contents($this->cli->stdout)
159 $this->markTestSkipped('This test required PHP 5.4.0');
162 $inputStream = fopen('php://memory','r+');
166 VERSION:3.0
172 $this->cli->stdin = $inputStream;
174 $this->assertEquals(
176 $this->cli->main(array('vobject', 'convert','--format=jcard', '--pretty', '-'))
179 rewind($this->cli->stdout);
180 $version = Version::VERSION;
182 // PHP 5.5.12 changed the output
192 $this->assertStringStartsWith(
194 stream_get_contents($this->cli->stdout)
201 $inputStream = fopen('php://memory','r+');
205 VERSION:3.0
211 $this->cli->stdin = $inputStream;
213 $this->assertEquals(
215 … $this->cli->main(array('vobject', 'convert','--format=jcal', '--inputformat=mimedir', '-'))
222 $inputStream = fopen('php://memory','r+');
229 "version",
242 "-\/\/Sabre\/\/Sabre VObject 3.1.0\/\/EN"
257 $this->cli->stdin = $inputStream;
259 $this->assertEquals(
261 …$this->cli->main(array('vobject', 'convert','--format=mimedir', '--inputformat=json', '--pretty', …
264 rewind($this->cli->stdout);
267 VERSION:4.0
268 PRODID:-//Sabre//Sabre VObject 3.1.0//EN
274 $this->assertEquals(
276 stream_get_contents($this->cli->stdout)
283 $inputStream = fopen('php://memory','r+');
286 $this->assertEquals(
288 $this->cli->main(array('vobject', 'convert','foo.json',$outputFile))
291 $this->assertEquals('json', $this->cli->inputFormat);
292 $this->assertEquals('json', $this->cli->format);
300 $this->assertEquals(
302 $this->cli->main(array('vobject', 'convert','foo.ics',$outputFile))
305 $this->assertEquals('mimedir', $this->cli->inputFormat);
306 $this->assertEquals('mimedir', $this->cli->format);
312 $inputStream = fopen('php://memory','r+');
316 VERSION:3.0
317 PRODID:-//Sabre//Sabre VObject 3.1.0//EN
324 $this->cli->stdin = $inputStream;
326 $this->assertEquals(
328 $this->cli->main(array('vobject', 'convert','--format=vcard40', '--pretty', '-'))
331 rewind($this->cli->stdout);
333 $version = Version::VERSION;
336 VERSION:4.0
337 PRODID:-//Sabre//Sabre VObject $version//EN
343 $this->assertEquals(
345 stream_get_contents($this->cli->stdout)
352 $inputStream = fopen('php://memory','r+');
356 VERSION:4.0
357 PRODID:-//Sabre//Sabre VObject 3.1.0//EN
364 $this->cli->stdin = $inputStream;
366 $this->assertEquals(
368 $this->cli->main(array('vobject', 'convert','--format=vcard30', '--pretty', '-'))
371 $version = Version::VERSION;
373 rewind($this->cli->stdout);
376 VERSION:3.0
377 PRODID:-//Sabre//Sabre VObject $version//EN
383 $this->assertEquals(
385 stream_get_contents($this->cli->stdout)
392 $inputStream = fopen('php://memory','r+');
396 VERSION:4.0
397 PRODID:-//Sabre//Sabre VObject 3.1.0//EN
404 $this->cli->stdin = $inputStream;
407 $this->assertEquals(
409 $this->cli->main(array('vobject', 'convert','--format=vcard21', '--pretty', '-'))
416 $inputStream = fopen('php://memory','r+');
420 VERSION:4.0
421 PRODID:-//Sabre//Sabre VObject 3.1.0//EN
429 $this->cli->stdin = $inputStream;
430 $result = $this->cli->main(array('vobject', 'validate', '-'));
432 $this->assertEquals(
441 $inputStream = fopen('php://memory','r+');
445 VERSION:2.0
451 $this->cli->stdin = $inputStream;
453 $this->assertEquals(
455 $this->cli->main(array('vobject', 'validate', '-'))
462 $inputStream = fopen('php://memory','r+');
466 VERSION:5.0
472 $this->cli->stdin = $inputStream;
474 $this->assertEquals(
476 $this->cli->main(array('vobject', 'validate', '-'))
483 $inputStream = fopen('php://memory','r+');
487 VERSION:5.0
493 $this->cli->stdin = $inputStream;
495 $this->assertEquals(
497 $this->cli->main(array('vobject', 'repair', '-'))
500 rewind($this->cli->stdout);
501 …->assertRegExp("/^BEGIN:VCARD\r\nVERSION:2.1\r\nUID:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4…
506 $inputStream = fopen('php://memory','r+');
510 VERSION:2.0
511 PRODID:-//Sabre//Sabre VObject 3.1.0//EN
522 $this->cli->stdin = $inputStream;
525 $result = $this->cli->main(array('vobject', 'repair', '-'));
527 rewind($this->cli->stderr);
528 $error = stream_get_contents($this->cli->stderr);
530 $this->assertEquals(
546 $inputStream = fopen('php://memory','r+');
548 $version = Version::VERSION;
556 VERSION:2.0
557 PRODID:-//Sabre//Sabre VObject {$version}//EN
562 REQUEST-STATUS:5;foo
570 $this->cli->stdin = $inputStream;
573 $result = $this->cli->main(array('vobject', 'color', '-'));
575 rewind($this->cli->stderr);
576 $error = stream_get_contents($this->cli->stderr);
578 $this->assertEquals(
594 $inputStream = fopen('php://memory','r+');
596 $version = Version::VERSION;
604 VERSION:4.0
605 PRODID:-//Sabre//Sabre VObject {$version}//EN
613 $this->cli->stdin = $inputStream;
616 $result = $this->cli->main(array('vobject', 'color', '-'));
618 rewind($this->cli->stderr);
619 $error = stream_get_contents($this->cli->stderr);
621 $this->assertEquals(