| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
include dirname(__FILE__).'/../../bootstrap/unit.php'; |
|---|
| 13 |
|
|---|
| 14 |
LimeAnnotationSupport::enable(); |
|---|
| 15 |
|
|---|
| 16 |
class TestClassDefinition |
|---|
| 17 |
{ |
|---|
| 18 |
public function testMethodDefinition() |
|---|
| 19 |
{ |
|---|
| 20 |
function testNestedFunctionDefinition() {} |
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
$this->__toString(); |
|---|
| 24 |
} |
|---|
| 25 |
} |
|---|
| 26 |
|
|---|
| 27 |
class TestClassDefinitionInOneLine {} |
|---|
| 28 |
|
|---|
| 29 |
interface TestInterfaceDefinition {} |
|---|
| 30 |
|
|---|
| 31 |
abstract class TestAbstractClassDefinition {} |
|---|
| 32 |
|
|---|
| 33 |
abstract class TestAbstractClassWithMethod { |
|---|
| 34 |
abstract public function testMethod(); |
|---|
| 35 |
} |
|---|
| 36 |
|
|---|
| 37 |
class TestExtendingClassDefinition extends TestClassDefinition {} |
|---|
| 38 |
|
|---|
| 39 |
class TestExtendingAbstractClassDefinition extends TestAbstractClassDefinition {} |
|---|
| 40 |
|
|---|
| 41 |
class TestImplementingClassDefinition implements TestInterfaceDefinition {} |
|---|
| 42 |
|
|---|
| 43 |
class TestExtendingAndImplementingClassDefinition extends TestClassDefinition implements TestInterfaceDefinition {} |
|---|
| 44 |
|
|---|
| 45 |
$t = new LimeTest(0); |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
try |
|---|
| 49 |
{ |
|---|
| 50 |
throw new Exception(); |
|---|
| 51 |
} catch (Exception $e) |
|---|
| 52 |
{ |
|---|
| 53 |
echo "Try is not matched\n"; |
|---|
| 54 |
} |
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
if (false) |
|---|
| 58 |
{ |
|---|
| 59 |
} |
|---|
| 60 |
else |
|---|
| 61 |
{ |
|---|
| 62 |
echo "If is not matched\n"; |
|---|
| 63 |
} |
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
$class = new TestClassDefinition(); |
|---|
| 68 |
$class = new TestClassDefinitionInOneLine(); |
|---|
| 69 |
$class = new TestExtendingClassDefinition(); |
|---|
| 70 |
$class = new TestExtendingAbstractClassDefinition(); |
|---|
| 71 |
$class = new TestImplementingClassDefinition(); |
|---|
| 72 |
$class = new TestExtendingAndImplementingClassDefinition(); |
|---|
| 73 |
|
|---|