Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of PHPUnit.
4
 *
5
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace PHPUnit\TextUI\XmlConfiguration;
11
 
12
use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\CodeCoverage;
13
use PHPUnit\TextUI\XmlConfiguration\Logging\Logging;
14
use PHPUnit\Util\Xml\ValidationResult;
15
 
16
/**
17
 * @internal This class is not covered by the backward compatibility promise for PHPUnit
18
 *
19
 * @psalm-immutable
20
 */
21
final class Configuration
22
{
23
    /**
24
     * @var string
25
     */
26
    private $filename;
27
 
28
    /**
29
     * @var ValidationResult
30
     */
31
    private $validationResult;
32
 
33
    /**
34
     * @var ExtensionCollection
35
     */
36
    private $extensions;
37
 
38
    /**
39
     * @var CodeCoverage
40
     */
41
    private $codeCoverage;
42
 
43
    /**
44
     * @var Groups
45
     */
46
    private $groups;
47
 
48
    /**
49
     * @var Groups
50
     */
51
    private $testdoxGroups;
52
 
53
    /**
54
     * @var ExtensionCollection
55
     */
56
    private $listeners;
57
 
58
    /**
59
     * @var Logging
60
     */
61
    private $logging;
62
 
63
    /**
64
     * @var Php
65
     */
66
    private $php;
67
 
68
    /**
69
     * @var PHPUnit
70
     */
71
    private $phpunit;
72
 
73
    /**
74
     * @var TestSuiteCollection
75
     */
76
    private $testSuite;
77
 
78
    public function __construct(string $filename, ValidationResult $validationResult, ExtensionCollection $extensions, CodeCoverage $codeCoverage, Groups $groups, Groups $testdoxGroups, ExtensionCollection $listeners, Logging $logging, Php $php, PHPUnit $phpunit, TestSuiteCollection $testSuite)
79
    {
80
        $this->filename         = $filename;
81
        $this->validationResult = $validationResult;
82
        $this->extensions       = $extensions;
83
        $this->codeCoverage     = $codeCoverage;
84
        $this->groups           = $groups;
85
        $this->testdoxGroups    = $testdoxGroups;
86
        $this->listeners        = $listeners;
87
        $this->logging          = $logging;
88
        $this->php              = $php;
89
        $this->phpunit          = $phpunit;
90
        $this->testSuite        = $testSuite;
91
    }
92
 
93
    public function filename(): string
94
    {
95
        return $this->filename;
96
    }
97
 
98
    public function hasValidationErrors(): bool
99
    {
100
        return $this->validationResult->hasValidationErrors();
101
    }
102
 
103
    public function validationErrors(): string
104
    {
105
        return $this->validationResult->asString();
106
    }
107
 
108
    public function extensions(): ExtensionCollection
109
    {
110
        return $this->extensions;
111
    }
112
 
113
    public function codeCoverage(): CodeCoverage
114
    {
115
        return $this->codeCoverage;
116
    }
117
 
118
    public function groups(): Groups
119
    {
120
        return $this->groups;
121
    }
122
 
123
    public function testdoxGroups(): Groups
124
    {
125
        return $this->testdoxGroups;
126
    }
127
 
128
    public function listeners(): ExtensionCollection
129
    {
130
        return $this->listeners;
131
    }
132
 
133
    public function logging(): Logging
134
    {
135
        return $this->logging;
136
    }
137
 
138
    public function php(): Php
139
    {
140
        return $this->php;
141
    }
142
 
143
    public function phpunit(): PHPUnit
144
    {
145
        return $this->phpunit;
146
    }
147
 
148
    public function testSuite(): TestSuiteCollection
149
    {
150
        return $this->testSuite;
151
    }
152
}