Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

Commit

Permalink
Remove further lang.Object references
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Nov 12, 2017
1 parent f8ebbd4 commit 4164f78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/test/php/scriptlet/unittest/Layout.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php namespace scriptlet\unittest;

abstract class Layout implements \xp\scriptlet\WebLayout {

}
5 changes: 2 additions & 3 deletions src/test/php/scriptlet/unittest/SourceTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use scriptlet\HttpScriptlet;
use lang\ClassLoader;
use lang\System;
use lang\Object;

class SourceTest extends \unittest\TestCase {
private static $scriptlet, $layout, $dir, $file;
Expand All @@ -22,7 +21,7 @@ public static function defineScriptlet() {

#[@beforeClass]
public static function defineLayout() {
self::$layout= ClassLoader::defineClass(self::class.'_Layout', Object::class, [WebLayout::class], '{
self::$layout= ClassLoader::defineClass(self::class.'_Layout', Layout::class, [], '{
public function mappedApplications($profile= null) { /* Intentionally empty */ }
public function staticResources($profile= null) { /* Intentionally empty */ }
}');
Expand Down Expand Up @@ -83,7 +82,7 @@ public function from_fully_qualified_layout_name_bc_with_colon_prefix() {
$this->assertInstanceOf(self::$layout, (new Source(':'.self::$layout->getName()))->layout());
}

#[@test, @expect(IllegalArgumentException::class), @values(['lang.Object', ':lang.Object'])]
#[@test, @expect(IllegalArgumentException::class), @values(['lang.Value', ':lang.Value'])]
public function cannot_create_when_passed_class_which_is_neither_scriptlet_nor_layout($name) {
(new Source($name))->layout();
}
Expand Down

0 comments on commit 4164f78

Please sign in to comment.