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(['vobject', '--hi'])
26 rewind($this->cli->stderr);
27 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
35 $this->cli->main(['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(['vobject', '-h'])
50 rewind($this->cli->stderr);
51 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
59 $this->cli->main(['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(['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(['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(['vobject', 'color'])
105 rewind($this->cli->stderr);
106 $this->assertTrue(strlen(stream_get_contents($this->cli->stderr)) > 100);
114 $this->cli->main(['vobject', 'color', 'a', 'b', 'c'])
123 $this->cli->main(['vobject', 'foo', '-'])
140 $this->cli->stdin = $inputStream;
144 $this->cli->main(['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(['vobject', 'convert', '--format=jcard', '--pretty', '-'])
179 rewind($this->cli->stdout);
193 stream_get_contents($this->cli->stdout)
210 $this->cli->stdin = $inputStream;
214 $this->cli->main(['vobject', 'convert', '--format=jcal', '--inputformat=mimedir', '-'])
256 $this->cli->stdin = $inputStream;
260 …$this->cli->main(['vobject', 'convert', '--format=mimedir', '--inputformat=json', '--pretty', '-'])
263 rewind($this->cli->stdout);
275 stream_get_contents($this->cli->stdout)
286 $this->cli->main(['vobject', 'convert', 'foo.json', $outputFile])
289 $this->assertEquals('json', $this->cli->inputFormat);
290 $this->assertEquals('json', $this->cli->format);
300 $this->cli->main(['vobject', 'convert', 'foo.ics', $outputFile])
303 $this->assertEquals('mimedir', $this->cli->inputFormat);
304 $this->assertEquals('mimedir', $this->cli->format);
322 $this->cli->stdin = $inputStream;
326 $this->cli->main(['vobject', 'convert', '--format=vcard40', '--pretty', '-'])
329 rewind($this->cli->stdout);
343 stream_get_contents($this->cli->stdout)
362 $this->cli->stdin = $inputStream;
366 $this->cli->main(['vobject', 'convert', '--format=vcard30', '--pretty', '-'])
371 rewind($this->cli->stdout);
383 stream_get_contents($this->cli->stdout)
402 $this->cli->stdin = $inputStream;
406 $this->cli->main(['vobject', 'convert', '--format=vcard21', '--pretty', '-'])
426 $this->cli->stdin = $inputStream;
427 $result = $this->cli->main(['vobject', 'validate', '-']);
448 $this->cli->stdin = $inputStream;
452 $this->cli->main(['vobject', 'validate', '-'])
469 $this->cli->stdin = $inputStream;
473 $this->cli->main(['vobject', 'validate', '-'])
490 $this->cli->stdin = $inputStream;
494 $this->cli->main(['vobject', 'repair', '-'])
497 rewind($this->cli->stdout);
498 …[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\r\nEND:VCARD\r\n$/", stream_get_contents($this->cli->stdout));
519 $this->cli->stdin = $inputStream;
521 $result = $this->cli->main(['vobject', 'repair', '-']);
523 rewind($this->cli->stderr);
524 $error = stream_get_contents($this->cli->stderr);
566 $this->cli->stdin = $inputStream;
568 $result = $this->cli->main(['vobject', 'color', '-']);
570 rewind($this->cli->stderr);
571 $error = stream_get_contents($this->cli->stderr);
608 $this->cli->stdin = $inputStream;
610 $result = $this->cli->main(['vobject', 'color', '-']);
612 rewind($this->cli->stderr);
613 $error = stream_get_contents($this->cli->stderr);