Lines Matching refs:this

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', '-'))
140 $this->cli->stdin = $inputStream;
142 $this->assertEquals(
144 $this->cli->main(array('vobject', 'convert','--format=json', '-'))
147 rewind($this->cli->stdout);
149 $this->assertEquals(
151 stream_get_contents($this->cli->stdout)
159 $this->markTestSkipped('This test required PHP 5.4.0');
172 $this->cli->stdin = $inputStream;
174 $this->assertEquals(
176 $this->cli->main(array('vobject', 'convert','--format=jcard', '--pretty', '-'))
179 rewind($this->cli->stdout);
192 $this->assertStringStartsWith(
194 stream_get_contents($this->cli->stdout)
211 $this->cli->stdin = $inputStream;
213 $this->assertEquals(
215 … $this->cli->main(array('vobject', 'convert','--format=jcal', '--inputformat=mimedir', '-'))
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);
274 $this->assertEquals(
276 stream_get_contents($this->cli->stdout)
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);
324 $this->cli->stdin = $inputStream;
326 $this->assertEquals(
328 $this->cli->main(array('vobject', 'convert','--format=vcard40', '--pretty', '-'))
331 rewind($this->cli->stdout);
343 $this->assertEquals(
345 stream_get_contents($this->cli->stdout)
364 $this->cli->stdin = $inputStream;
366 $this->assertEquals(
368 $this->cli->main(array('vobject', 'convert','--format=vcard30', '--pretty', '-'))
373 rewind($this->cli->stdout);
383 $this->assertEquals(
385 stream_get_contents($this->cli->stdout)
404 $this->cli->stdin = $inputStream;
407 $this->assertEquals(
409 $this->cli->main(array('vobject', 'convert','--format=vcard21', '--pretty', '-'))
429 $this->cli->stdin = $inputStream;
430 $result = $this->cli->main(array('vobject', 'validate', '-'));
432 $this->assertEquals(
451 $this->cli->stdin = $inputStream;
453 $this->assertEquals(
455 $this->cli->main(array('vobject', 'validate', '-'))
472 $this->cli->stdin = $inputStream;
474 $this->assertEquals(
476 $this->cli->main(array('vobject', 'validate', '-'))
493 $this->cli->stdin = $inputStream;
495 $this->assertEquals(
497 $this->cli->main(array('vobject', 'repair', '-'))
500 rewind($this->cli->stdout);
501this->assertRegExp("/^BEGIN:VCARD\r\nVERSION:2.1\r\nUID:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-…
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(
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(
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(