Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 51... Línea 51...
51
     * @dataProvider iri_samples_provider
51
     * @dataProvider iri_samples_provider
52
     * @param string $value Value to generate IRI
52
     * @param string $value Value to generate IRI
53
     * @param string $expected Expected result
53
     * @param string $expected Expected result
54
     * @param string $type = null If some special type is provided
54
     * @param string $type = null If some special type is provided
55
     */
55
     */
56
    public function test_generate(string $value, string $expected, string $type = null) {
56
    public function test_generate(string $value, string $expected, string $type = null): void {
57
        $iri = iri::generate($value, $type);
57
        $iri = iri::generate($value, $type);
58
        $this->assertEquals($iri, $expected);
58
        $this->assertEquals($iri, $expected);
59
    }
59
    }
Línea 60... Línea 60...
60
 
60
 
Línea 64... Línea 64...
64
     * @dataProvider iri_samples_provider
64
     * @dataProvider iri_samples_provider
65
     * @param string $expected Expected result
65
     * @param string $expected Expected result
66
     * @param string $value Value to generate IRI
66
     * @param string $value Value to generate IRI
67
     * @param string $type = null If some special type is provided
67
     * @param string $type = null If some special type is provided
68
     */
68
     */
69
    public function test_extract(string $expected, string $value, string $type = null) {
69
    public function test_extract(string $expected, string $value, string $type = null): void {
70
        $extract = iri::extract($value, $type);
70
        $extract = iri::extract($value, $type);
71
        $this->assertEquals($extract, $expected);
71
        $this->assertEquals($extract, $expected);
72
    }
72
    }
Línea 73... Línea 73...
73
 
73
 
Línea 108... Línea 108...
108
     *
108
     *
109
     * @dataProvider iri_check_provider
109
     * @dataProvider iri_check_provider
110
     * @param string $value Value to generate IRI
110
     * @param string $value Value to generate IRI
111
     * @param bool $expected Expected result
111
     * @param bool $expected Expected result
112
     */
112
     */
113
    public function test_check(string $value, bool $expected) {
113
    public function test_check(string $value, bool $expected): void {
114
        $check = iri::check($value);
114
        $check = iri::check($value);
115
        $this->assertEquals($check, $expected);
115
        $this->assertEquals($check, $expected);
116
    }
116
    }
Línea 117... Línea 117...
117
 
117