选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
查看 communityComponentsTest.php - 文件管理器
👁 查看:communityComponentsTest.php
路径:/virtual/bigbrother/sns/test/functional/pc_frontend/communityComponentsTest.php
大小:1.92 KB · 修改:2010-08-10 13:59:42 · 权限:0644 · 可写
<?php

include(dirname(__FILE__).'/../../bootstrap/functional.php');

$browser = new sfTestFunctional(new sfBrowser(), new lime_test(null, new lime_output_color()));
$browser
  ->info('0. Login')
  ->get('/member/login')
  ->click('ログイン', array('authMailAddress' => array(
    'mail_address' => 'sns@example.com',
    'password'     => 'password',
  )))
  ->isStatusCode(302)

  ->info('1. Create a community.')
  ->get('community/edit')
  ->click('送信', array('community' => array(
    'name'   => 'test',
    'config' => array('public_flag' => 'public', 'topic_authority' => 'public', 'description' => 'test')
  )))
  ->isStatusCode(302)

  ->info('2. Community list is shown on the member\'s home.')
  ->get('member/home')
;

$selector = new sfDomCssSelector($browser->getResponseDom());
$list = $selector->getElements('#Left h3:contains("コミュニティリスト")');
$browser->test()->ok($list, 'a community list gadget exists');

$photoLink = '';
$textLink = '';

$xpath = new DOMXPath($browser->getResponseDom());
foreach ($xpath->query('../../table/tr', $list[0]) as $item)
{
  if ($item->getAttribute('class') === 'photo')
  {
    $photoLink = $item->firstChild->getElementsByTagName('a')->item(0)->getAttribute('href');
  }
  elseif ($item->getAttribute('class') === 'text')
  {
    $textLink = $item->firstChild->getElementsByTagName('a')->item(0)->getAttribute('href');
  }
}

$browser->test()->ok($photoLink, 'photo link exists');
$browser->test()->ok($textLink, 'text link exists');

$browser
  ->info('links in a community list is a valid (ref. #3546)')
  ->info('photo link is a valid')
  ->get($photoLink)
  ->isStatusCode(200)
  ->with('request')->begin()
    ->isParameter('module', 'community')
    ->isParameter('action', 'home')
  ->end()
  ->info('text link is a valid')
  ->get($textLink)
  ->isStatusCode(200)
  ->with('request')->begin()
    ->isParameter('module', 'community')
    ->isParameter('action', 'home')
  ->end()
;
ページが見つかりませんでした – Lumiere Shop
ここを指しているリンクに誤りがあったようです。検索してみるのはいかがですか ?
お買い物カゴ