Lines Matching refs:cli
14 $this->cli = new CliMock();
15 $this->cli->stderr = fopen('php://memory','r+');
16 $this->cli->stdout = fopen('php://memory','r+');
24 $this->cli->main(array('vobject', '--hi'))
26 rewind($this->cli->stderr);
27 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
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)));
48 $this->cli->main(array('vobject', '-h'))
50 rewind($this->cli->stderr);
51 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
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);
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);
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);
102 $this->cli->main(array('vobject', 'color'))
105 rewind($this->cli->stderr);
106 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
114 $this->cli->main(array('vobject', 'color', 'a', 'b', 'c'))
123 $this->cli->main(array('vobject', 'foo', '-'))
140 $this->cli->stdin = $inputStream;
144 $this->cli->main(array('vobject', 'convert','--format=json', '-'))
147 rewind($this->cli->stdout);
151 stream_get_contents($this->cli->stdout)
172 $this->cli->stdin = $inputStream;
176 $this->cli->main(array('vobject', 'convert','--format=jcard', '--pretty', '-'))
179 rewind($this->cli->stdout);
194 stream_get_contents($this->cli->stdout)
211 $this->cli->stdin = $inputStream;
215 … $this->cli->main(array('vobject', 'convert','--format=jcal', '--inputformat=mimedir', '-'))
257 $this->cli->stdin = $inputStream;
261 …$this->cli->main(array('vobject', 'convert','--format=mimedir', '--inputformat=json', '--pretty', …
264 rewind($this->cli->stdout);
276 stream_get_contents($this->cli->stdout)
288 $this->cli->main(array('vobject', 'convert','foo.json',$outputFile))
291 $this->assertEquals('json', $this->cli->inputFormat);
292 $this->assertEquals('json', $this->cli->format);
302 $this->cli->main(array('vobject', 'convert','foo.ics',$outputFile))
305 $this->assertEquals('mimedir', $this->cli->inputFormat);
306 $this->assertEquals('mimedir', $this->cli->format);
324 $this->cli->stdin = $inputStream;
328 $this->cli->main(array('vobject', 'convert','--format=vcard40', '--pretty', '-'))
331 rewind($this->cli->stdout);
345 stream_get_contents($this->cli->stdout)
364 $this->cli->stdin = $inputStream;
368 $this->cli->main(array('vobject', 'convert','--format=vcard30', '--pretty', '-'))
373 rewind($this->cli->stdout);
385 stream_get_contents($this->cli->stdout)
404 $this->cli->stdin = $inputStream;
409 $this->cli->main(array('vobject', 'convert','--format=vcard21', '--pretty', '-'))
429 $this->cli->stdin = $inputStream;
430 $result = $this->cli->main(array('vobject', 'validate', '-'));
451 $this->cli->stdin = $inputStream;
455 $this->cli->main(array('vobject', 'validate', '-'))
472 $this->cli->stdin = $inputStream;
476 $this->cli->main(array('vobject', 'validate', '-'))
493 $this->cli->stdin = $inputStream;
497 $this->cli->main(array('vobject', 'repair', '-'))
500 rewind($this->cli->stdout);
501 …[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\r\nEND:VCARD\r\n$/", stream_get_contents($this->cli->stdout));
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);
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);
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);