This file is indexed.

/usr/share/php/tests/Horde_Injector/Horde/Injector/Binder/AnnotatedSettersTest.php is in php-horde-injector 2.0.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
class Horde_Injector_Binder_AnnotatedSettersTest extends Horde_Test_Case
{
    public function testShouldCallAnnotatedSetters()
    {
        $instance = new Horde_Injector_Binder_AnnotatedSettersTest__TypedSetterDependency();
        $binder = new Horde_Injector_Binder_AnnotatedSettersTest__EmptyBinder($instance);
        $df = new Horde_Injector_DependencyFinder();
        $injector = new Horde_Injector(new Horde_Injector_TopLevel());
        $annotatedSettersBinder = new Horde_Injector_Binder_AnnotatedSetters($binder, $df);

        $this->assertNull($instance->dep);
        $newInstance = $annotatedSettersBinder->create($injector);
        $this->assertInstanceOf('Horde_Injector_Binder_AnnotatedSettersTest__NoDependencies', $newInstance->dep);
    }
}

/**
 * Used by preceeding tests!!!
 */

class Horde_Injector_Binder_AnnotatedSettersTest__EmptyBinder implements Horde_Injector_Binder
{
    public $instance;
    public function __construct($instance)
    {
        $this->instance = $instance;
    }

    public function create(Horde_Injector $injector)
    {
        return $this->instance;
    }

    public function equals(Horde_Injector_Binder $otherBinder)
    {
        return false;
    }
}

class Horde_Injector_Binder_AnnotatedSettersTest__NoDependencies
{
}

class Horde_Injector_Binder_AnnotatedSettersTest__TypedSetterDependency
{
    public $dep;

    /**
     * @inject
     */
    public function setDep(Horde_Injector_Binder_AnnotatedSettersTest__NoDependencies $dep)
    {
        $this->dep = $dep;
    }
}