|
@@ -111,7 +111,7 @@ class ArticleControllerTest extends TestCase {
|
|
|
$this->assertSame(4, TestEnv::temUtil()->count(Article::class));
|
|
$this->assertSame(4, TestEnv::temUtil()->count(Article::class));
|
|
|
|
|
|
|
|
$article = TestEnv::tem()->find(Article::class, $id);
|
|
$article = TestEnv::tem()->find(Article::class, $id);
|
|
|
- $this->assertSame('Title POST', $article->getTitle());
|
|
|
|
|
|
|
+ $this->assertSame('Title POST', $article->title);
|
|
|
$tx->commit();
|
|
$tx->commit();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -123,8 +123,8 @@ class ArticleControllerTest extends TestCase {
|
|
|
$tx = TestEnv::createTransaction(true);
|
|
$tx = TestEnv::createTransaction(true);
|
|
|
$this->assertSame(3, TestEnv::temUtil()->count(Article::class));
|
|
$this->assertSame(3, TestEnv::temUtil()->count(Article::class));
|
|
|
$article = TestEnv::tem()->find(Article::class, $this->article1Id);
|
|
$article = TestEnv::tem()->find(Article::class, $this->article1Id);
|
|
|
- $this->assertSame('Title 3', $article->getTitle());
|
|
|
|
|
- $this->assertSame('Lorem ipsum 3', $article->getText());
|
|
|
|
|
|
|
+ $this->assertSame('Title 3', $article->title);
|
|
|
|
|
+ $this->assertSame('Lorem ipsum 3', $article->text);
|
|
|
$tx->commit();
|
|
$tx->commit();
|
|
|
|
|
|
|
|
$response = TestEnv::http()->newRequest()
|
|
$response = TestEnv::http()->newRequest()
|
|
@@ -143,9 +143,9 @@ class ArticleControllerTest extends TestCase {
|
|
|
$this->assertSame(3, TestEnv::temUtil()->count(Article::class));
|
|
$this->assertSame(3, TestEnv::temUtil()->count(Article::class));
|
|
|
|
|
|
|
|
$article = TestEnv::tem()->find(Article::class, $this->article1Id);
|
|
$article = TestEnv::tem()->find(Article::class, $this->article1Id);
|
|
|
- $this->assertSame('Title PUT', $article->getTitle());
|
|
|
|
|
|
|
+ $this->assertSame('Title PUT', $article->title);
|
|
|
|
|
|
|
|
- $this->assertSame('Text PUT', $article->getText());
|
|
|
|
|
|
|
+ $this->assertSame('Text PUT', $article->text);
|
|
|
|
|
|
|
|
$tx->commit();
|
|
$tx->commit();
|
|
|
}
|
|
}
|
|
@@ -156,7 +156,7 @@ class ArticleControllerTest extends TestCase {
|
|
|
*/
|
|
*/
|
|
|
function testPutDoArticleExpectExceptionBecauseOfInvalidCategoryName() {
|
|
function testPutDoArticleExpectExceptionBecauseOfInvalidCategoryName() {
|
|
|
$tx = TestEnv::createTransaction(true);
|
|
$tx = TestEnv::createTransaction(true);
|
|
|
- $categoryName = TestEnv::tem()->find(Article::class, $this->article1Id)->getCategoryName();
|
|
|
|
|
|
|
+ $categoryName = TestEnv::tem()->find(Article::class, $this->article1Id)->categoryName;
|
|
|
$tx->commit();
|
|
$tx->commit();
|
|
|
|
|
|
|
|
// only certain CategoryNames are allowed; in setup category restrictions are not checked.
|
|
// only certain CategoryNames are allowed; in setup category restrictions are not checked.
|