BlockTest.php 622 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Bear
  5. * Date: 2020/3/2
  6. * Time: 下午6:06
  7. */
  8. class BlockTest extends TestInit
  9. {
  10. public function testBlock()
  11. {
  12. $insert = [
  13. "block_id"=>"11",
  14. "book_id"=>"",
  15. "image"=>"/uploads/20200302/3046725b493c96bff78240e7b2beb7ca.jpeg",
  16. "page_id"=>"1",
  17. "special_id"=>"4",
  18. "type"=>"3",
  19. "url"=>"http://www.baidu.com",
  20. "weigh"=>"0"
  21. ];
  22. // model('manage_block_resource')->validate(true);
  23. model('manage_block_resource')->allowField(true)->save($insert);
  24. }
  25. }