~tcuthbert/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php
 
3
--SKIPIF--
 
4
<?php
 
5
if (!defined('JSON_PRETTY_PRINT')) {
 
6
    print "skip: JSON_PRETTY_PRINT is required";
 
7
} else if (json_encode(array(), JSON_PRETTY_PRINT) == '[]') {
 
8
    print "skip: Has PHP #66021 (Blank line inside empty JSON array/object)";
 
9
}
 
10
?>
 
11
--FILE--
 
12
<?php
 
13
$_SERVER['argv'][1] = '--no-configuration';
 
14
$_SERVER['argv'][2] = '--log-json';
 
15
$_SERVER['argv'][3] = 'php://stdout';
 
16
$_SERVER['argv'][4] = 'BankAccountTest';
 
17
$_SERVER['argv'][5] = dirname(__FILE__).'/../_files/BankAccountTest.php';
 
18
 
 
19
require __DIR__ . '/../bootstrap.php';
 
20
PHPUnit_TextUI_Command::main();
 
21
?>
 
22
--EXPECTF--
 
23
PHPUnit %s by Sebastian Bergmann.
 
24
 
 
25
{
 
26
    "event": "suiteStart",
 
27
    "suite": "BankAccountTest",
 
28
    "tests": 3
 
29
}{
 
30
    "event": "testStart",
 
31
    "suite": "BankAccountTest",
 
32
    "test": "BankAccountTest::testBalanceIsInitiallyZero"
 
33
}.{
 
34
    "event": "test",
 
35
    "suite": "BankAccountTest",
 
36
    "test": "BankAccountTest::testBalanceIsInitiallyZero",
 
37
    "status": "pass",
 
38
    "time": %f,
 
39
    "trace": [
 
40
 
 
41
    ],
 
42
    "message": "",
 
43
    "output": ""
 
44
}{
 
45
    "event": "testStart",
 
46
    "suite": "BankAccountTest",
 
47
    "test": "BankAccountTest::testBalanceCannotBecomeNegative"
 
48
}.{
 
49
    "event": "test",
 
50
    "suite": "BankAccountTest",
 
51
    "test": "BankAccountTest::testBalanceCannotBecomeNegative",
 
52
    "status": "pass",
 
53
    "time": %f,
 
54
    "trace": [
 
55
 
 
56
    ],
 
57
    "message": "",
 
58
    "output": ""
 
59
}{
 
60
    "event": "testStart",
 
61
    "suite": "BankAccountTest",
 
62
    "test": "BankAccountTest::testBalanceCannotBecomeNegative2"
 
63
}.{
 
64
    "event": "test",
 
65
    "suite": "BankAccountTest",
 
66
    "test": "BankAccountTest::testBalanceCannotBecomeNegative2",
 
67
    "status": "pass",
 
68
    "time": %f,
 
69
    "trace": [
 
70
 
 
71
    ],
 
72
    "message": "",
 
73
    "output": ""
 
74
}
 
75
 
 
76
Time: %s, Memory: %sMb
 
77
 
 
78
OK (3 tests, 3 assertions)