Skip to content

Commit

Permalink
test: interface methods overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Mar 18, 2019
1 parent 7c47383 commit 9c0ad9c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
File renamed without changes.
32 changes: 32 additions & 0 deletions tests/classes/overloading_010.php
@@ -0,0 +1,32 @@
<?php

interface SessionBagInterface {
public function getName();
}

final class SessionBagProxy implements SessionBagInterface {
public function getName() {
return __METHOD__;
}
}

class A extends B {
public function getPropertyValue($object) { return __METHOD__; }
}

abstract class B extends C implements I {

}

class C {

}

interface I {
public function getPropertyValue($containingValue);
}

echo (new SessionBagProxy)->getName();
echo (new A)->getPropertyValue(NULL);

echo "Done.";

0 comments on commit 9c0ad9c

Please sign in to comment.