znt/module/screen/test/model/getmetricpagination.php

49 lines
2 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 screenModel::getMetricPagination();
timeout=0
cid=18248
- 执行screenTest模块的getMetricPaginationTest方法参数是null
- 属性index @1
- 属性size @5
- 属性total @0
- 属性pageTotal @1
- 执行screenTest模块的getMetricPaginationTest方法
- 属性index @1
- 属性size @5
- 属性total @0
- 属性pageTotal @1
- 执行screenTest模块的getMetricPaginationTest方法
- 属性index @1
- 属性size @12
- 属性total @0
- 属性pageTotal @1
- 执行screenTest模块的getMetricPaginationTest方法
- 属性index @1
- 属性size @10
- 属性total @0
- 属性pageTotal @1
- 执行screenTest模块的getMetricPaginationTest方法
- 属性index @1
- 属性size @12
- 属性total @0
- 属性pageTotal @1
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/model.class.php';
su('admin');
$screenTest = new screenModelTest();
r($screenTest->getMetricPaginationTest(null)) && p('index,size,total,pageTotal') && e('1,5,0,1');
r($screenTest->getMetricPaginationTest((object)array('option' => (object)array('displayType' => 'normal', 'tableOption' => (object)array(), 'card' => (object)array())))) && p('index,size,total,pageTotal') && e('1,5,0,1');
r($screenTest->getMetricPaginationTest((object)array('option' => (object)array('displayType' => 'card', 'tableOption' => (object)array(), 'card' => (object)array())))) && p('index,size,total,pageTotal') && e('1,12,0,1');
r($screenTest->getMetricPaginationTest((object)array('option' => (object)array('displayType' => 'normal', 'tableOption' => (object)array('rowNum' => 10, 'pagination' => (object)array('size' => 8)), 'card' => (object)array())))) && p('index,size,total,pageTotal') && e('1,10,0,1');
r($screenTest->getMetricPaginationTest((object)array('option' => (object)array('displayType' => 'card', 'tableOption' => (object)array(), 'card' => (object)array('countEachRow' => 3, 'countEachColumn' => 4, 'pagination' => (object)array('size' => 15)))))) && p('index,size,total,pageTotal') && e('1,12,0,1');